""" 
SG90舵机

接线:
    IO控制线 --> GPIO17
"""

from machine import Pin
import time
from servo import Servo

servo = Servo(Pin(17))

if __name__ == "__main__":
    while True:
        servo.write_angle(0)
        time.sleep(2)
        servo.write_angle(45)
        time.sleep(2)
        servo.write_angle(90)
        time.sleep(2)
        servo.write_angle(180)
        time.sleep(2)
